from django.urls import path
from .views import *
from rest_framework.routers import DefaultRouter

# 自动生成视图集的路由
route = DefaultRouter()
route.register('coupon',CouponsViewSet)

urlpatterns = [
    # 加载所有的优惠券类型
    path('types/',CouponTypeAPIView.as_view())
]

urlpatterns += route.urls